<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link id="favicon" href="favicon.ico" rel="icon" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:property value="d.realName" /> 老师</title>
<link rel="stylesheet" href="css/viewdriver.css" />
<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.1.custom.min.css">
<style type="text/css">
.field {
overflow: hidden;
}
label, legend {
display: block;
font-weight: bold;
font-size: 12px;
font-weight: normal;
margin-bottom: 8px;
}
input[type="text"], input[type="password"], input[type="email"], textarea, select {
border: 1px solid #d8d8d8;
padding: 9px;
outline: none;
font: 12px Arial, sans-serif;
color: #888;
margin: 0;
max-width: 100%;
display: block;
background: #fff;
-webkit-box-shadow: 0px 1px 1px 0px rgba(180, 180, 180, 0.1);
box-shadow: 0px 1px 1px 0px rgba(180, 180, 180, 0.1);
}
.field textarea {
max-width: 97%;
min-width: 93%;
height: 180px;
margin: 5px 0 15px 0;
}
.field input ,.field select{
width: 240px;
margin-bottom: 15px;
}
</style>
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/idvalidate.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.min.js"></script>
<script language="javascript" type="application/javascript">
	$(document).ready(function(){
		$("#dialog_error").dialog({ 
			autoOpen: false,
			title: "发生错误",
			minHeight:200,
			minWidth:240,
			closeOnEscape:true,
			modal:false
		});
		$("#dialog_input").dialog({ 
			autoOpen: false,
			title: "填充评论",
			minHeight:200,
			minWidth:240,
			closeOnEscape:true,
			modal:false,
			buttons:[{text:"确认",click:function(){
				$("#commentForm").submit();
			}},{text:"取消",click:function(){
				$("#dialog_input").dialog('close');
			}}]
		});
		$("#evaluate-doc").click(function(){
			<s:if test="canComment == false">
			$("#dialog_error").dialog('open');
			</s:if>
			<s:if test="canComment == true">
			$("#dialog_input").dialog('open');
			</s:if>
		});
	});
</script>

</head>
<body id="lg_body">
	<div id="lg_wrap">
		<div id="ln_header">
			<div class="header_logo_bg">
				<div class="header_link"> 
						<a target="_blank" href="http://www.changdajx.cn/%E8%81%94%E7%B3%BB%E6%88%91%E4%BB%AC/"
						class="help_icon">问题咨询</a>&nbsp;&nbsp; 
						<a target="_blank"
						href="http://www.changdajx.cn"
						class="home_icon">驾校首页</a>&nbsp;&nbsp;
				</div>
			</div>
		</div>
		<div class="main_link">
			<a href="/jxgl/login"><b>首页</b></a> &gt; <font color="#666666">查看老师 <s:property value="d.realName" /></font>
		</div>
		<div id="ln_main" class="g-clear" style="height:800px;">
        	<div id="drierLeft" class="driver-left g-grid7-l">
            	<div id="driverLeftInner">
                	<div class="driver-info js-info">
                    	<div class="driver-image"><img src="/jxgl/download.action?fileName=<s:property value="d.avatar" />" alt="<s:property value="d.realName" />"></div>
                        <span class="name"><s:property value="d.realName" /></span>
                        <span class="title1">任课老师 / 专职<s:if test="d.driverType == 0">手动档</s:if><s:else>自动档</s:else>老师</span>
                        <div id="dept-container" class="department">
                        现居住地:<s:property value="d.liveCity" />
                        </div>
                        <div class="phone">
                        手机:<s:property value="d.phone" />
                        </div>
                        <div class="licensetype">
                        准驾车型：<s:property value="d.licenseType" />
                        </div>
                        <div class="fav-container middle">
                        	<a id="addFavBtn" class="gb2 gbt-orange" href="/jxgl/student/seldriver?driverid=<s:property value="d.id" />">选择教练</a>
						</div>
                        <div class="fav-res-num">
							<span class="fav-num">
                            <span class="num js-fav-num"><s:property value="countOfComment + 10" /></span>名学生
                            </span>
                            <span class="res-num">
                            <span class="num"><s:property value="countOfComment" /></span>人已评价
                            </span>
                    	</div>
                    </div>
                    <div class="driver-desc">
                    	<div class="intro">
                            <div class="intro-title">擅长介绍：</div>
                            <div class="intro-content">
								<s:property value="d.note" />
								<s:if test="d.note == ''">老师比较害羞，还没有写介绍：）</s:if>
								
                            </div>
                        </div>
                        <div class="intro">
							<div class="intro-title">网上报名规则：</div>
                                <div class="intro-content">
                                请电话我司进行了解。
                                </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="driverRight" class="driver-right g-grid7-r">
            	<div class="review-score">
                    <div class="driver-common-title g-clear">
						<span class="left">驾校综合评价</span>
                    </div>
                    <div class="wrap g-clear">
                    	<div class="star">
                    		<h3 class="orange"><s:property value="d.rate" /><span> 分</span></h3>
		                    <div class="comment" title="<s:property value="d.rate" />分">
		                    	<s:if test="d.rate >= 1">
        			            <span class="gi2 gi-star1"></span>
        			            </s:if>
        			            <s:else>
        			            <span class="gi2 gi-star3"></span>
        			            </s:else>
        			            <s:if test="d.rate >= 2">
        			            <span class="gi2 gi-star1"></span>
        			            </s:if>
        			            <s:else>
        			            <span class="gi2 gi-star3"></span>
        			            </s:else>
			                    <s:if test="d.rate >= 3">
        			            <span class="gi2 gi-star1"></span>
        			            </s:if>
        			            <s:else>
        			            <span class="gi2 gi-star3"></span>
        			            </s:else>
            			        <s:if test="d.rate >= 4">
        			            <span class="gi2 gi-star1"></span>
        			            </s:if>
        			            <s:else>
        			            <span class="gi2 gi-star3"></span>
        			            </s:else>
        			            <s:if test="d.rate >= 5">
        			            <span class="gi2 gi-star1"></span>
        			            </s:if>
        			            <s:else>
        			            <span class="gi2 gi-star3"></span>
        			            </s:else>
                    		</div>
                    	</div>
                        <div class="states">
	                        <div class="line g-clear">
    		                    <label>老师态度：</label>
            		            <span class="orange score"><strong><s:property value="d.rate" /></strong>分</span>
                    		    <div class="p">
                        			<div class="pr">
                        				<p>
					                        比平均水平4.0分
                        					<s:if test="d.rate >= 4.1"><span class="green">高</span></s:if>
						                    <s:elseif test="d.rate <= 3.9"><span class="green">低</span></s:elseif>
						                    <s:else><span class="green">相当</span></s:else>
                        				</p>
                        			</div>
                        		</div>
                        	</div>
                        <div class="line g-clear">
		                    <label>学习效果：</label>
        		            <span class="orange score"><strong><s:property value="d.rate" /></strong>分</span>
                		    <div class="p">
                    			<div class="pr">
                    				<p>
					                    比平均水平4.0分
					                    <s:if test="d.rate >= 4.1"><span class="green">高</span></s:if>
						                    <s:elseif test="d.rate <= 3.9"><span class="green">低</span></s:elseif>
						                    <s:else><span class="green">相当</span></s:else>
                    				</p>
                    			</div>
                    		</div>
                    	</div>
                    </div>
                    <div class="btns">
                    	<div>我是此老师的学生！</div>
                    		<div>
                    			<a id="evaluate-doc" href="#" class="gbn gbt-orange">我要评分</a>
                    		</div>
                    		<div class="nums">
                    			<s:property value="countOfComment" />人已经评分
                    		</div>
                    	</div>
                    </div>
                </div>
                <div class="driver-comment">
                	<div class="driver-common-title g-clear">
						<span class="left">学员评价</span>
                    </div>
                    <div class="comment-list">
                    	<s:iterator value="ssds" id="c">
                    		<div class="comment-list-item g-clear">                    	
                        	<div class="summary g-clear">
								<div class="left">学习时间：<span class="value"><s:date name="#c.pickdate" format="yyyy-MM-dd"/></span>
								</div>
                                <div class="right">
                                    成效：<span class="value effect">	<s:if test="#c.effect == 5">很好</s:if>
                                    <s:elseif test="#c.effect == 4">好</s:elseif>
                                    <s:elseif test="#c.effect == 3">一般</s:elseif>
                                    <s:elseif test="#c.effect == 2">差</s:elseif>
                                    <s:else>较差</s:else></span>
                                    态度：<span class="value"> <s:if test="#c.attitude == 5">很好</s:if>
                                    <s:elseif test="#c.attitude == 4">好</s:elseif>
                                    <s:elseif test="#c.attitude == 3">一般</s:elseif>
                                    <s:elseif test="#c.attitude == 2">差</s:elseif>
                                    <s:else>较差</s:else></span>
                                </div>                                
							</div>
                            <div class="detail"><s:property value="#c.comment" /></div>
                                <div class="time"><s:property value="#c.stuname" />于&nbsp;<s:date name="#c.comment_time" format="yyyy-MM-dd"/>&nbsp;&nbsp;评价</div>
                                <a class="gb2 gb2-blue js-useful" href="#">有用(0)</a>
                        </div>
                    	</s:iterator>
                    	<!-- <div class="comment-list-item g-clear">                    	
                        	<div class="summary g-clear">
								<div class="left">学习时间：<span class="value">2012/4/15</span>
								</div>
                                <div class="right">
                                    成效：<span class="value effect">	很好</span>
                                    态度：<span class="value">满意</span>
                                </div>                                
							</div>
                            <div class="detail">学校环境不错，老师也很nice，态度很好！给五分！</div>
                                <div class="time">顾**&nbsp;&nbsp;于&nbsp;2013-01-23 18:39:14&nbsp;&nbsp;评价</div>
                                <a class="gb2 gb2-blue js-useful" href="#">有用(3)</a>
                        </div>
                    	<div class="comment-list-item g-clear">
                        	<div class="summary g-clear">
								<div class="left">学习时间：<span class="value">2012/12/30</span>
								</div>
                                <div class="right">
                                    成效：<span class="value effect">	很好</span>
                                    态度：<span class="value">满意</span>
                                </div>                                
							</div>
                            <div class="detail">学校设施很好，老师很耐心，虽然我很菜=。=</div>
                                <div class="time">李**&nbsp;&nbsp;于&nbsp;2013-2-1 18:39:14&nbsp;&nbsp;评价</div>
                                <a class="gb2 gb2-blue js-useful" href="#">有用(30)</a>
                        </div>
                    	<div class="comment-list-item g-clear">
                        	<div class="summary g-clear">
								<div class="left">学习时间：<span class="value">2012/12/1</span>
								</div>
                                <div class="right">
                                    成效：<span class="value effect">	非常好</span>
                                    态度：<span class="value">满意</span>
                                </div>                                
							</div>
                            <div class="detail">学车要坚持啊，感谢老师！</div>
                                <div class="time">周**&nbsp;&nbsp;于&nbsp;2012-12-03 18:02:34&nbsp;&nbsp;评价</div>
                                <a class="gb2 gb2-blue js-useful" href="#">有用(1)</a>
                        </div>
                    	<div class="comment-list-item g-clear">
                        	<div class="summary g-clear">
								<div class="left">学习时间：<span class="value">2012/12/23</span>
								</div>
                                <div class="right">
                                    成效：<span class="value effect">不错</span>
                                    态度：<span class="value">基本满意</span>
                                </div>                                
							</div>
                            <div class="detail">忘记评价了，老师很仔细耐心</div>
                                <div class="time">王**&nbsp;&nbsp;于&nbsp;2013-2-6 23:05:23&nbsp;&nbsp;评价</div>
                                <a class="gb2 gb2-blue js-useful" href="#">有用(6)</a>
                        </div>
                         -->
                    </div>
                </div>
            </div>
		</div>
	</div>
	<div id="dialog_error" title="Dialog Title"><s:property value="msg" /></div>
	<div id="dialog_input" title="Dialog Title">
	<div>
		<form action="commentDriver" method="POST" id="commentForm">
			<input type="hidden" name="driverid" value="<s:property value="d.id" />" />
				<div class="field">
					<label>评分</label>
					<span>
						<select name="rate">
							<option value="5" selected>5</option>
							<option value="4">4</option>
							<option value="3">3</option>
							<option value="2">2</option>
							<option value="1">1</option>
						</select>
					</span>
				</div>
				<div class="field">
					<label>教练态度</label>
					<span>
						<select name="attitude">
							<option value="5" selected>很好</option>
							<option value="4">好</option>
							<option value="3">一般</option>
							<option value="2">较差</option>
							<option value="1">很差</option>
						</select>
					</span>
				</div>
				<div class="field">
					<label>学车成效</label>
					<span>
						<select name="effect">
							<option value="5" selected>很好</option>
							<option value="4">好</option>
							<option value="3">一般</option>
							<option value="2">较差</option>
							<option value="1">很差</option>
						</select>
					</span>
				</div>
				<div class="field">
					<label>详细评价</label>
					<span>
						<textarea name="comment"></textarea>
					</span>
				</div>
		</form>
	</div>	
	</div>
</body>
</html>